-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(synthetics): lifecycle rules for auto-generated artifact buckets #22863
Conversation
…buckets This change exposes the lifecycle rules property for new and existing auto-generated artifact buckets so that workload owners can easily manage growth. fixes aws#22634
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mackensen! This looks good! I'll run the integ test sometime today. In the meantime, can you add this somewhere to the readme?
* Lifecycle rules for the generated canary artifact bucket. | ||
* | ||
* @default - No rules applied. This has no effect if a bucket is passed | ||
* to `artifactsBucketLocation`. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Lifecycle rules for the generated canary artifact bucket. | |
* | |
* @default - No rules applied. This has no effect if a bucket is passed | |
* to `artifactsBucketLocation`. | |
*/ | |
* Lifecycle rules for the generated canary artifact bucket. Has no effect | |
* if a bucket is passed to `artifactsBucketLocation`. If you pass a bucket | |
* to `artifactsBucketLocation`, you can add lifecycle rules to the bucket | |
* itself. | |
* | |
* @default - no rules applied to the generated bucket. | |
*/ |
handler: 'index.handler', | ||
code: synthetics.Code.fromInline('/* Synthetics handler code */'), | ||
}), | ||
runtime: synthetics.Runtime.SYNTHETICS_1_0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runtime: synthetics.Runtime.SYNTHETICS_1_0, | |
runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_8, |
@kaizencc thanks for the feedback, I've updated the branch. |
@mackensen I ran the integ test for you. It is somehow here. Not sure what went on to make it not a part of this particular branch, but Ill leave it to you to merge your branch with the commit that has the updated snapshot. In addition, this PR needs a readme update that mentions the ability to add lifecycle rules to the created s3 bucket. |
@kaizencc thanks, cherry-picked your commit and updated the README. |
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mackensen! Apologies for not getting back to you sooner. This is ready to go once the build succeeds. My comments on the readme, when addressed, should fix the build.
enforceSSL: true, | ||
}); | ||
|
||
const canary = new synthetics.Canary(this, 'MyCanary', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the build is failing because we are creating two canary
consts in the same example.
|
||
You can pass an S3 bucket to store artifacts from canary runs. If you do not, one will be auto-generated when the canary is created. You may add [lifecycle rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) to the auto-generated bucket. | ||
|
||
Artifact bucket examples: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets delete this line and move it in to the ts example
```typescript | ||
// Auto-generated bucket with lifecycle rules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```typescript | |
// Auto-generated bucket with lifecycle rules. | |
```ts | |
// configure lifecycle rules on the auto-generated artifact bucket. |
|
||
// Custom bucket as artifact bucket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
github ui doesn't like when my suggestions involve "```"
so I'll just describe what i want here.
we should split up the example into two here and change the comment to the one below:
// configure lifecycle rules on a custom artifact bucket.
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
…#26290) A re-roll of #22863. Thanks for getting this started @mackensen! This change exposes the lifecycle rules property for new and existing auto-generated artifact buckets so that workload owners can easily manage growth. Fixes #22634 Co-authored-by: Charles Fulton fultonc@lafayette.edu ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…aws#26290) A re-roll of aws#22863. Thanks for getting this started @mackensen! This change exposes the lifecycle rules property for new and existing auto-generated artifact buckets so that workload owners can easily manage growth. Fixes aws#22634 Co-authored-by: Charles Fulton fultonc@lafayette.edu ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This change exposes the lifecycle rules property for new and existing auto-generated artifact buckets so that workload owners can easily manage growth.
fixes #22634
I'm not able to run the integration tests.
All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license